package com.finance.system.service;

import com.finance.framework.lang.Page;
import com.finance.framework.lang.PageResultBO;
import com.finance.rule.bean.pojo.MajorRule;
import com.finance.system.bean.pojo.Supplier;
import com.finance.system.bean.pojo.SupplierGroup;

import java.util.List;
import java.util.Map;

/**
 * Created by gly on 2017/4/1.
 */
public interface ISupplierService {


    PageResultBO<Supplier> listByPage(Page page);

    Supplier getById(Long id);

    Supplier getByCode(String code);

    Boolean add(Supplier supplier);

    Boolean delete(Long uid, List<String> ids);

    Boolean update(Supplier supplier);

    List<Supplier> listAll();

    List<Map<String, String>> listGroups();

    String getGroupIdByName(String name);

    MajorRule getRuleByName(String name);

    Long addGroup(SupplierGroup supplierGroup);

    Boolean codeIsExist(String code);

    Boolean groupCodeIsExist(String code);

    Long addRule(MajorRule majorRule);

    MajorRule getRuleById(String id);

    Boolean updateRule(MajorRule majorRule);

    String getCodeByName (String name);

}
